{% load static %}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p>{{ name }}</p>
<p>{{ age }}</p>

<p>字典</p>
<p>{{ score }}</p>
{% for key, value in score.items %}
    <p>{{ key }}:{{ value }}</p>
{% endfor %}

<p>列表</p>
<p>{{ hobby }}</p>
<p>{{ hobby.0 }}</p>
<p>{{ hobby.1 }}</p>
<p>{{ hobby.2 }}</p>

<p>字典2</p>
<p>{{ res }}</p>
{% for key, value in res.items %}
    {% if forloop.counter == 3 %}
        {% for ikey, ivalue in value.items %}
            <p>{{ ikey }}:{{ ivalue }}</p>
        {% endfor %}
    {% elif forloop.last %}
        {% for one in value %}
            {% if forloop.first %}
                <p style="background-color: red">{{ one }}</p>
            {% elif forloop.last %}
                <p style="background-color: blue">{{ one }}</p>
            {% else %}
                <p style="background-color: yellow">{{ one }}</p>
            {% endif %}
        {% endfor %}
    <p>{{ key }}:{{ value }}</p>
    {% endif %}
{% endfor %}
<p><img src="../static/img/nengdu.jpg" alt=""></p>
<p><img src="/static/img/nengdu.jpg" alt=""></p>
<p></p>
<p></p>
<p><img src="{% static "img/nengdu.jpg" %}" alt=""></p>
</body>
</html>